1. Field of the Invention
The present invention relates to an image processing apparatus, an image reading apparatus and an image recording apparatus having the function of detecting a predetermined pattern from an image including the pattern.
2. Description of Related Art
Conventionally, in order to prevent copying of banknotes, securities and so on, image reading apparatus, such as an image scanner, and image recording apparatus, such as a copying machine, incorporate a memory for storing some characteristics of banknotes, etc., and an ASIC (image processing apparatus) for detecting specific images such as banknotes by comparing an inputted image with images stored in the memory and performing pattern matching, and prohibits copying if a specific image such as a banknote is detected (see, for example, Japanese Utility Model Application Laid-Open No. 05-85158, and Japanese Patent Applications Laid-Open No. 06-178098 and No. 2003-99788).
For example, Japanese Utility Model Application Laid-Open No. 05-85158 discloses an image processing apparatus for detecting a circular image such as a banknote's red seal. When a red pixel is detected in a main scanning direction of an image read, first, the image processing apparatus performs a thinning process on the image composed of a plurality of red pixels. Thereafter, when the image processing apparatus detects another red pixel at a position separated from the position of the thinned image by a predetermined distance in the main scanning direction, it supposes that the red pixel detected first and the red pixel detected next correspond to both end positions of a line segment that is a diameter of the circle, and then turns the line segment by a predetermined angle in the main scanning direction. If the positions of the two pixels on both sides of the line segment are within a predetermined range of the positions of the pixels stored in the memory, the image processing apparatus determines that the red pixels are an image having a circular outer circumference (red seal image).
Moreover, in an image processing apparatus disclosed as a similar technique in Japanese Patent Application Laid-Open No. 06-178098, when pixels corresponding to both ends of a line segment that is a diameter of a circle in the main scanning direction are detected and a part of the circle is detected at a position separated from the center of the circle by a predetermined distance in a sub-scanning direction, the image processing apparatus determines that the detected pixels are part of an image to be detected. Further, the image processing apparatus counts the number of times the pixels within a predetermined distance in the detected circle are turned on, namely the number of red pixels, and determines whether or not the counted value is equal to a numerical value corresponding to specific image data pre-stored in a memory. If they are equal, the image processing apparatus determines that the image formed by the detected pixels is a specific circular image (red seal image).
However, in the image processing apparatus disclosed in Japanese Utility Model Application Laid-Open No. 05-85158, by detecting a red seal image, the detected image is determined to be a red seal image formed on a banknote. Thus, although this image processing apparatus is simple and convenient, it often determines an image similar to a red seal image to be the red seal image, and has the problem of very poor determination accuracy.
On the other hand, the image processing apparatus disclosed in Japanese Patent Application Laid-Open No. 06-178098 counts red pixels in a detected red circle, and compares a counted number using a specific image pre-stored in the memory with a counted number using an externally inputted image. Therefore, this image processing apparatus has high determination accuracy, but it is necessary to store the specific image, and the storage capacity of the memory increases. Moreover, since comparison means for performing a high-speed comparing process on such large-volume data is required, this image processing apparatus has drawbacks that a comparison circuit in the image processing apparatus is complicated and the manufacturing cost of the image processing apparatus is high.
Further, in Japanese Patent Application Laid-Open No. 2003-99788, the applicant of this application proposed an image processing apparatus for extracting a target image portion to be extracted, which is included in an image to be processed. This image processing apparatus comprises determining means for determining whether or not a part of a specific image segment of a target image portion is included in an image to be processed, and confirming means for confirming whether or not a target image portion candidate including the specific image segment is the target image portion when a determination is made that the specific image segment is included in the image to be processed, and proposes a technique for detecting a specific target image with high accuracy. However, this does not realize the detection of a plurality of specific images by a simple circuit structure.